home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / game / shoot / ADoomPPC_src.lha / ADoomPPC_src / d_think.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.8 KB  |  83 lines

  1. // Emacs style mode select   -*- C++ -*- 
  2. //-----------------------------------------------------------------------------
  3. //
  4. // $Id:$
  5. //
  6. // Copyright (C) 1993-1996 by id Software, Inc.
  7. //
  8. // This source is available for distribution and/or modification
  9. // only under the terms of the DOOM Source Code License as
  10. // published by id Software. All rights reserved.
  11. //
  12. // The source is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
  15. // for more details.
  16. //
  17. // DESCRIPTION:
  18. //  MapObj data. Map Objects or mobjs are actors, entities,
  19. //  thinker, take-your-pick... anything that moves, acts, or
  20. //  suffers state changes of more or less violent nature.
  21. //
  22. //-----------------------------------------------------------------------------
  23.  
  24.  
  25. #ifndef __D_THINK__
  26. #define __D_THINK__
  27.  
  28.  
  29. #ifdef __GNUG__
  30. #pragma interface
  31. #endif
  32.  
  33. #ifdef __SASC
  34. #pragma options align=mac68k
  35. #endif
  36.  
  37. //
  38. // Experimental stuff.
  39. // To compile this as "ANSI C with classes"
  40. //  we will need to handle the various
  41. //  action functions cleanly.
  42. //
  43. typedef  void  (*actionf_v)();
  44. typedef  void  (*actionf_p1)( void* );
  45. typedef  void  (*actionf_p2)( void*, void* );
  46.  
  47. typedef union
  48. {
  49.   actionf_p1     acp1;
  50.   actionf_v     acv;
  51.   actionf_p2     acp2;
  52.  
  53. }  actionf_t;
  54.  
  55.  
  56.  
  57.  
  58. // Historically, "think_t" is yet another
  59. //  function pointer to a routine to handle
  60. //  an actor.
  61. typedef actionf_t   think_t;
  62.  
  63.  
  64. // Doubly linked list of actors.
  65. typedef struct thinker_s
  66. {
  67.     struct thinker_s  *    prev;
  68.     struct thinker_s  *    next;
  69.     think_t         function;
  70.     
  71. }  thinker_t;
  72.  
  73. #ifdef __SASC
  74. #pragma options align=power
  75. #endif
  76.  
  77. #endif
  78. //-----------------------------------------------------------------------------
  79. //
  80. // $Log:$
  81. //
  82. //-----------------------------------------------------------------------------
  83.